from django.urls import path
from .views import (
    CategoryListAPIView, CategoryDetailAPIView,
    ProductListAPIView, ProductDetailAPIView,
    # ProductReviewListAPIView, ProductReviewDetailAPIView,
    Upload, SearchAPIView, QiniuUploadAPIView, FileURLAPIView,
    BannerListAPIView, HistoryListAPIView, HistoryList, Mongo
)
from utils.xie_tong_suan_fa import Recommend

urlpatterns = [
    #----------------
    #-------------
    # path('reviews/', ProductReviewListAPIView.as_view(), name='review-list'),# 确保这个路由存在
    # path('reviews/<int:pk>/', ProductReviewDetailAPIView.as_view(), name='review-detail'),# 确保这个路由存在//详情页要用
    path('categories/', CategoryListAPIView.as_view(), name='category-list'),# 分类
    path('categories/<int:pk>/', CategoryDetailAPIView.as_view(), name='category-detail'),# 
    path('xietong/', Recommend.as_view()),
    path('products/', ProductListAPIView.as_view(), name='product-list'),## 商品列表和详情
    path('products/<int:pk>/', ProductDetailAPIView.as_view(), name='product-detail'),  # 商品详情接口//详情页要用
    path('upload_store/', Upload.as_view(), name='upload'),#上传图片本地存储
    path('search/', SearchAPIView.as_view(), name='search'),
    #七牛云上传图片
    path('upload/', QiniuUploadAPIView.as_view(), name='qiniu-upload'),#上传图片到七牛云
    path('file_url/',FileURLAPIView.as_view()),#获取七牛云图片url
    path('banners/', BannerListAPIView.as_view(), name='banner-list'),
    path('banners/<int:pk>/', BannerListAPIView.as_view(), name='banner-detail'),
    # path('addhistory/', HistoryListAPIView.as_view(), name='addhistory'),#历史记录添加
    path('gethistory/', HistoryList.as_view(), name='gethistory'),#历史记录查
    path('mongo/', Mongo.as_view(), name='mongo'),#mongo

]



'''
{
    "refresh_token": "25.267509bab314d4dc464eb91f2714ffca.315360000.2066382181.282335-119367322",
    "expires_in": 2592000,
    "session_key": "9mzdAvvYph0Ra/Z/yPgVsIBAAyFllCtvSKlYwiVzcM9tgZgLlBetKoWFNgd7nVpuB+9J46/GC8P6Y5KPmN9FEmkX6ey8cJI=",
    "access_token": "24.99c28e3ac85d94af2bb7048170bc9f77.2592000.1753614181.282335-119367322",
    "scope": "public brain_all_scope brain_face_scene_scope vis-faceverify_faceverify_h5-face-liveness vis-faceverify_FACE_EFFECT vis-faceverify_face_feature_sdk vis-faceverify_FACE_V3 vis-faceverify_idl_face_merge wise_adapt lebo_resource_base lightservice_public hetu_basic lightcms_map_poi kaidian_kaidian ApsMisTest_Test权限 vis-classify_flower lpq_开放 cop_helloScope ApsMis_fangdi_permission smartapp_snsapi_base smartapp_mapp_dev_manage iop_autocar oauth_tp_app smartapp_smart_game_openapi oauth_sessionkey smartapp_swanid_verify smartapp_opensource_openapi smartapp_opensource_recapi fake_face_detect_开放Scope vis-ocr_虚拟人物助理 idl-video_虚拟人物助理 smartapp_component smartapp_search_plugin avatar_video_test b2b_tp_openapi b2b_tp_openapi_online smartapp_gov_aladin_to_xcx",
    "session_secret": "0afde6ec2081e4432f615c95c01ea88e"
}
'''